package com.addcn.texas.data 
{
	import flash.utils.Dictionary;
	/**
	 * 遊戲全局遍曆類
	 * @author lmzd
	 */
	public class Global extends Object
	{
		//遊戲名稱
		public static var GAME_NAME:String = "德州撲克";
		//loading加载的xml URL
		public static const LOADING_XML : String = "startupLoad.xml";
		
		private var _pagrams : Object = new Object();
		//遊戲版本
		private var _version:String;		
		//頭像地址
		private var _photo_url : String;
		//遊戲模式
		private var _debug:Boolean = false;
		//文件下載字典
		public var _file:Dictionary = new Dictionary();
		//本類的實例對象
		private static var _instance:Global;
		
		public function Global() 
		{
			if ( _instance != null ) {
				trace("Glode init error");
			}
			return;
		}
		/**
		 * 設置主程序版本號
		 * @param	param
		 */
		public function set version(param:String):void {
			_version = param;
		}
		public function get version():String {
			return _version;
		}
	
		
		/**
		 * 記錄是否是在debug環境下
		 */
		public function set debug(param:Boolean):void {
			_debug = param;
		}
		public function get debug():Boolean {
			return _debug;
		}
		
		/**
		 * 記錄頁面傳遞過來的參數
		 */
		public function setPagram(r_key : String, r_val : *) : void
		{
			if(r_key!=null && r_val!=null){
				this._pagrams[r_key] = r_val;
			}
		}
		public function getPagram(r_key : String) : *
		{
			return this._pagrams[r_key];
		}
		/**
		 * 初始本類
		 * @return
		 */
		public static function getInstance():Global {
			if ( _instance == null ) {
				_instance = new Global();
			}
			return _instance
		}
		
	}

}
